// 顶部导航菜单
<template>
  <el-row class="nav-member">
    <el-row class="header">
      <el-row style="width:1150px;">
        <el-col :span="5">
          <div class="logo"> V 8 </div>
        </el-col>
        <el-col :span="10">
          <el-row class="menu1" type="flex" justify="center" align="middle">
            <template v-if="memberLastResult">
              <el-col :span="7" class="draw-number">
                <!--对应游戏名称-->
                <el-row> {{memberGames[memberGameSelected]}}</el-row>
                <!--对应游戏开奖期数-->
                <el-row> {{memberLastResult.lastResult.period}}期开奖</el-row>
              </el-col>
              <el-col :span="17" :class="{
                  T_PK10:memberGameSelected==='bjpk10'||memberGameSelected==='azlucky10'||memberGameSelected==='amsc'||memberGameSelected==='jsft'
                  ||memberGameSelected==='amjssc'||memberGameSelected==='xyft'||memberGameSelected==='jssc',
                  T_KL8:memberGameSelected==='bjkl8'||memberGameSelected==='azlucky20',
                  T_SSC:memberGameSelected==='cqssc'||memberGameSelected==='azlucky5'||memberGameSelected==='jsssc'||memberGameSelected==='xjssc'
                  ||memberGameSelected==='tjssc'||memberGameSelected==='bsssc'||memberGameSelected==='gama',
                  T_KLSF:memberGameSelected==='gdklsf'||memberGameSelected==='azlucky8',XYNCTerm:memberGameSelected==='cqxync',
                  T_K3:memberGameSelected==='gxk3',T_11X5:memberGameSelected==='gd115',T_GXKLSF:memberGameSelected==='gxklsf',
                }">
                <span :class="{pc28_ball_grey_0:memberGameSelected ==='pcegg',}"></span>
                <b v-if="memberLastResult.lastResult.numbers" v-for="(item,index) in memberLastResult.lastResult.numbers.split(',')" :key="index" class="bb" :class="`b${item}`"></b>
              </el-col>
            </template>
            <template v-else>
              <el-col :span="23" class="draw-number">
                <span style="width:200px">未有开奖信息</span>
              </el-col>
            </template>
            <el-col :span="1">
              <!-- <div>声音</div> -->
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="7">
          <el-row class="menu-link">
            <el-row style="margin-top:10px;">
              <el-col :span="6">
                <router-link to="/member/raw">未结明细</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/balanced">今日已结</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/history">两周报表</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/jiang">开奖结果</router-link>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <router-link to="/member/profile">个人资讯</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/changepwd">修改密码</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/rule">游戏规则</router-link>
              </el-col>
              <el-col :span="6">
                <router-link to="/member/option">设置</router-link>
              </el-col>
            </el-row>
          </el-row>
        </el-col>
        <el-col :span="2">
          <el-row>
            <div class="logout" @click="logout"></div>
          </el-row>
        </el-col>
      </el-row>
    </el-row>
    <!--头部导航栏-->
    <el-row class="tabs">
      <el-row style="width:1150px;">
        <el-col :span="3" v-for="(item,index) in memberGames" :key="`memberGames${index}`">
          <el-row class="item" :class="memberGameSelected==index && 'current'">
            <div @click="handleTabClick(index,item)">{{item}}</div>
          </el-row>
        </el-col>
         <!--<el-button name="/option">设置</el-button>-->
      </el-row>
    </el-row>
    <!--头部二级导航栏-->
    <el-row v-if="memberPages" class="subtabs">
      <el-button class="btn" v-for="(child,indexChild) in memberPages" :key="`memberPages${indexChild}`"
              :class="memberPageSelected == indexChild && 'btn-active'" size="mini" @click="handleTabChildClick(indexChild)">{{child}}</el-button>
    </el-row>
  </el-row>
</template>

<script>
import { mapGetters } from 'vuex'
import { dttaLottery } from '@/utils/colorvariety' // 参数映射

export default {
  name: 'MemberNavHeader',
  data() {
    return {
      game: '0',
      page: '0',
      none: false,
      gsus:'lm'
    }
  },
  components: {},
  computed: {
    ...mapGetters([
      'memberGames',
      'memberPages',
      'memberLottery',
      'memberGamePeriod',
      'memberGameSelected',
      'memberPageSelected',
      'memberLastResult',
      'memberLastOrder',
    ]),
  },
  async created() {
    this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
    await this.$store.dispatch('MemberGames', {})
    this.game = Object.keys(this.memberGames)[0]
  },
  methods: {
    async handleTabClick(gameIndex, label = '') {
      let _this = this;
      _this.memberLastResult.lastResult.numbers = '';
      if (label === '设置') {
        this.$router.push('/option')
      } else {
        this.game = gameIndex
        this.game === this.memberGameSelected || this.$store.commit('MEMBER_SELECT_GAME', this.game)
        this.$router.push('/member/list')
      }
      // 导航切换同时获取投注页面选项
      if(gameIndex ==='bjpk10'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='jsft'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='jssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='xyft'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='amsc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='amjssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='azlucky10'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(gameIndex ==='azlucky20'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.all)
      }
      if(gameIndex ==='bjkl8'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.all)
      }
      if(gameIndex ==='jsssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='tjssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='xjssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='cqssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='gama'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='bsssc'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='azlucky5'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(gameIndex ==='azlucky8'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(gameIndex ==='gdklsf'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(gameIndex ==='cqxync'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(gameIndex ==='gxklsf') {
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf['15'])
      }
      if(gameIndex ==='gd115'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gd115.lm)
      }
      if(gameIndex ==='pcegg'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.pcegg.lm)
      }
      if(gameIndex ==='gxk3'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxk3.all)
      }

      // 导航切换同时获取赔率
      await this.$store.dispatch('MemberOrdersOdds', {
        game: this.game,
        page: this.page,
        _: parseInt(Date.now() / 1000),
      })
    },

    async handleTabChildClick(indexChild) {
      console.log('ssssssssss',indexChild)
      this.gsus = indexChild
      this.page = indexChild
      this.page === this.memberPageSelected ||
      this.$store.commit('MEMBER_SELECT_PAGE', this.page)
      // 北京快乐8
      if(this.memberGameSelected === 'bjkl8' && indexChild === 'all'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.all)
      }
      if(this.memberGameSelected === 'bjkl8' && indexChild === 'zm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.zm)
      }
      // 澳洲幸运20
      if(this.memberGameSelected === 'azlucky20' && indexChild === 'all'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.all)
      }
      if(this.memberGameSelected === 'azlucky20' && indexChild === 'zm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.azlucky20.zm)
      }
      // 北京pk10
      if(this.memberGameSelected === 'bjpk10' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'bjpk10' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'bjpk10' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // 极速赛车
      if(this.memberGameSelected === 'jssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'jssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'jssc' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // 幸运飞艇
      if(this.memberGameSelected === 'xyft' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'xyft' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'xyft' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // America赛车
      if(this.memberGameSelected === 'amsc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'amsc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'amsc' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // 极速飞艇
      if(this.memberGameSelected === 'jsft' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      // // 香港六合彩
      // if(this.memberGameSelected === 'hk6' && indexChild === 'tm'){
      //   this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      // }
      if(this.memberGameSelected === 'jsft' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'jsft' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // America极速赛车
      if(this.memberGameSelected === 'amjssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'amjssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'amjssc' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // 澳洲幸运10
      if(this.memberGameSelected === 'azlucky10' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.lm)
      }
      if(this.memberGameSelected === 'azlucky10' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.zd)
      }
      if(this.memberGameSelected === 'azlucky10' && indexChild === 'gyh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.bjpk10.gyh)
      }
      // 重庆时时彩
      if(this.memberGameSelected === 'cqssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'cqssc' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)
      }
      // 極速时时彩
      if(this.memberGameSelected === 'jsssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'jsssc' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)
      }
      // 新疆时时彩
      if(this.memberGameSelected === 'xjssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'xjssc' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)
        // 天津时时彩
        if(this.memberGameSelected === 'tjssc' && indexChild === 'lm'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.lm)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'zd'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.zd)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'yzzh'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.yzzh)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'ezzh'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.ezzh)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'szzh'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.szzh)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'ezdw'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.ezdw)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'szdw'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.szdw)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'ezhs'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.ezhs)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'szhs'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.szhs)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'zxs'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.zxs)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'zxl'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.zxl)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'fszh'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.fszh)
        }
        if(this.memberGameSelected === 'tjssc' && indexChild === 'kd'){
          this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.tjssc.kd)
      }
      }
      // 天津时时彩
      if(this.memberGameSelected === 'tjssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'tjssc' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)

        }
      // 刺激时时彩
      if(this.memberGameSelected === 'gama' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'gama' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)

      }
      // 寶時时时彩
      if(this.memberGameSelected === 'bsssc' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'bsssc' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)

      }
      // 澳洲幸运5
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.lm)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zd)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'yzzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.yzzh)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'ezzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezzh)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'szzh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szzh)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'ezdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezdw)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'szdw'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szdw)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'ezhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.ezhs)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'szhs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.szhs)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'zxs'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxs)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'zxl'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.zxl)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'fszh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.fszh)
      }
      if(this.memberGameSelected === 'azlucky5' && indexChild === 'kd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.cqssc.kd)

      }
      // 广东快乐十分
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'zh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zd)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball1'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball1)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball2'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball2)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball3'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball3)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball4'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball4)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball5'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball5)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball6'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball6)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball7'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball7)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'ball8'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball8)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'zm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zm)
      }
      if(this.memberGameSelected === 'gdklsf' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.lm)
      }
      // 重庆幸运农场
      if(this.memberGameSelected === 'cqxync' && indexChild === 'zh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zd)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball1'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball1)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball2'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball2)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball3'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball3)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball4'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball4)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball5'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball5)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball6'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball6)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball7'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball7)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'ball8'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball8)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'zm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zm)
      }
      if(this.memberGameSelected === 'cqxync' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.lm)
      }
      // 澳洲幸运8
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'zh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zh)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'zd'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zd)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball1'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball1)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball2'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball2)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball3'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball3)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball4'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball4)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball5'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball5)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball6'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball6)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball7'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball7)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'ball8'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.ball8)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'zm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.zm)
      }
      if(this.memberGameSelected === 'azlucky8' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gdklsf.lm)
      }
      //广西快乐十分
      if(this.memberGameSelected === 'gxklsf' && indexChild === '15'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf['15'])
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.lm)
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'ball1'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.ball1)
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'ball2'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.ball2)
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'ball3'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.ball3)
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'ball4'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.ball4)
      }
      if(this.memberGameSelected === 'gxklsf' && indexChild === 'ball5'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxklsf.ball5)
      }
      //广东11选5
      if(this.memberGameSelected === 'gd115' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gd115.lm)
      }
      if(this.memberGameSelected === 'gd115' && indexChild === 'dh'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gd115.dh)
      }
      if(this.memberGameSelected === 'gd115' && indexChild === 'mp'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gd115.mp)
      }
      if(this.memberGameSelected === 'gd115' && indexChild === 'zx'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gd115.zx)
      }
      // pc蛋蛋
      if(this.memberGameSelected === 'pcegg' && indexChild === 'lm'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.pcegg.lm)
      }
      //广西快3
      if(this.memberGameSelected === 'gxk3' && indexChild === 'all'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxk3.all)
      }
      if(this.memberGameSelected === 'gxk3' && indexChild === 'yxx'){
        this.$store.commit('MEMBER_SET_LOTTERY', dttaLottery.gxk3.yxx)
      }
      this.$router.push('/member/list')
    },

    logout() {
      this.$store.dispatch('FedLogOut').then(() => {
        location.reload() // 为了重新实例化vue-router对象 避免bug
      })
    },
    // ,
    // goBack() {
    //   window.history.length > 1 ? this.$router.go(-1) : this.$router.push("/");
    // }
  },

  watch: {
    async game(to, from) {
      console.log('memberGameSelected', to, from)
      if (to !== '0') {
        await this.$store.dispatch('MemberOrdersPages', {})
        console.log('this.memberPages010101010101010', Object.keys(this.memberPages))
        this.page = Object.keys(this.memberPages)[0]
        // 获取对应游戏的账号信息
        await this.$store.dispatch('MemberGameAccount', {})
      }
            // 获取最新开奖结果
      await this.$store.dispatch('MemberLastResult', {
        game: this.game,
      })
      // 获取最新注单
      await this.$store.dispatch('MemberLastOrder', {
        game: this.game,
      })
    },
    async page(to, from) {
      console.log('memberPageSelected', to, from);
      if (to !== '0' && to) {
        // await this.$store.dispatch('MemberOrdersLottery', {
        //   game: this.game,
        //   page: this.page,
        // })
        await this.$store.dispatch('MemberOrdersOdds', {
          game: this.game,
          page: this.page,
          _: parseInt(Date.now() / 1000),
        })

      }
    },
  },
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.nav-member {
  .header {
    background: linear-gradient(to bottom, #007ab2 0%, #239bd9 100%);
    color: #fff;
    height: 60px;
    .logo {
      padding-top: 12px;
      text-align: center;
      font-size: 30px;
      font-weight: 700;
    }
    .menu1 {
      height: 60px;
      .draw-number {
        font-weight: 700;
        .el-row {
          padding: 3px;
          text-align: center;
        }
      }
      .bb {
        display: inline-block;
        margin-top: 5px;
      }
    }
    .menu-link {
      .el-row {
        .el-col {
          margin-top: 3px;
          padding: 2px;
          font-weight: 700;
          cursor: pointer;
          text-align: center;
          border-right: 1px solid #fff;
          &:last-of-type {
            border: none;
          }
        }
        .el-col:hover {
          color: #ff0;
        }
      }
    }
    .logout {
      margin-top: 20px;
      height: 24px;
      width: 70px;
      background-image: url(/static/member/images/skin/blue/logout.png);
      cursor: pointer;
    }
  }
  .tabs {
    width: 100%;
    background-color: rgb(15, 63, 115);
    .item {
      cursor: pointer;
      height: 40px;
      color: #fff;
      font-weight: bold;
      &:hover {
        color: #ff0;
      }
      div {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    .current {
      background-color: #f2f2f2;
      color: rgb(15, 63, 115);
      &:hover {
        color: rgb(15, 63, 115);
      }
    }
  }
  .subtabs {
    padding: 5px 0 5px 190px;
  }

  .btn {
    padding: 6px 20px;
    &:hover {
      color: #fff;
      background-color: rgb(255, 126, 76);
    }
  }

  .btn-active {
    border: rgb(255, 126, 76);
    color: #fff;
    background-color: rgb(255, 126, 76);
  }
}
</style>
